<template>
	<div>
		<component :is="component"></component>
	</div>
</template>

<script>
	export default {
		data(){
			let current = this._self._root._router.history.current;
			let routeMap = this._self._root._router.routesMap;
			console.log(current)
			console.log(routeMap)
			return {
				routeMap,
				history:this._self._root._router.history,
				component:routeMap[current]
			}
			
		},
		mounted(){
			window.addEventListener('hashchange',()=>{
				let current = this._self._root._router.history.current;
				this.component = this.routeMap[current]
			})
		}
	}
</script>